using System;
using System.Collections.Generic;

namespace Core
{
    [Serializable]
    public class Customer : IEqualityComparer<Customer>
    {
        public virtual string CustomerId { get; set; }
        public virtual string CustomerName { get; set; }
        public virtual string Address { get; set; }
        public virtual string City { get; set; }
        public virtual string PostalCode { get; set; }
        public virtual string Country { get; set; }
        public virtual string Telp { get; set; }
        public virtual string Fax { get; set; }
        public virtual string Email { get; set; }
        public virtual string ContactPerson { get; set; }
        public virtual COA Coa { get; set; }
        public virtual string created_by { get; set; }
        public virtual DateTime? created_date { get; set; }
        public virtual string modified_by { get; set; }
        public virtual DateTime? modified_date { get; set; }

        #region IEqualityComparer<Customer> Members

        public virtual bool Equals(Customer x, Customer y)
        {
            return x.CustomerId == y.CustomerName;
        }

        public virtual int GetHashCode(Customer obj)
        {
            return obj.CustomerId.GetHashCode();
        }

        #endregion
    }
}